import request from '@/utils/request'
export default {
  customerList(params) {
    return request({
      url: '/v1/customerList',
      method: 'get',
      params
    })
  },
  detail(id) {
    return request({
      url: `/v1/customer/${id}`,
      method: 'get'
    })
  },
  create(data) {
    return request({
      url: `/v1/customerAdd`,
      method: 'post',
      data
    })
  },
  update(data) {
    return request({
      url: `/v1/customerUpdate`,
      method: 'post',
      data
    })
  },
  delete(data) {
    return request( {
      url: `/v1/customerDel`,
      method:'post',
      data
    })
  },
  contactsAppend(data) {
    return request( {
      url: `/v1/customerAppendContacts`,
      method:'post',
      data
    })
  },
  contactsRemove(data) {
    return request( {
      url: `/v1/customerRemoveContacts`,
      method:'post',
      data
    })
  }
}
